package org.example.springaitest.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TransactionMapper {

    @Select("SELECT ts.name " +
            "FROM transaction_records tr " +
            "JOIN transaction_status ts ON tr.status = ts.id " +
            "WHERE tr.SERIALNO = #{serialNo}")
    String findStatusNameBySerialNo(@Param("serialNo") String serialNo);

}
